﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using Aga.GestionDeArchivos.Domain.Entities;
using System.Data.Objects;

namespace Aga.GestionDeArchivos.Storage
{
    public class ReimpresionRepository : RepositoryBase<Reimpresion>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ReimpresionRepository"/> class.
        /// </summary>
        /// <param name="context">The context.</param>
        public ReimpresionRepository(AgaEntities context)
            : base(context) { }

        /// <summary>
        /// Adds to context.
        /// </summary>
        /// <param name="entity">The entity.</param>
        /// <returns></returns>
        protected override Action<Reimpresion> AddToContext(Reimpresion entity)
        {
            return delegate { Context.AddToReimpresiones(entity); };
        }

        /// <summary>
        /// Gets the entity set.
        /// </summary>
        /// <value>The entity set.</value>
        protected override ObjectSet<Reimpresion> EntitySet
        {
            get { return Context.Reimpresiones; }
        }
    }
}
